var a1 = [
    { host: '1', ip: 1 },
    { host: '2', ip: 2 },
    { host: '3', ip: 4 },
    { host: '4', ip: 4 }
]
var a2 = [
    { host: '1', ip: 1 },
    { host: '2', ip: 2 }
]
function isValueEqual(a, b) {
    let keysAry = Object.keys(a);
    for (var i = 0; i < keysAry.length; i++) {
        let keyName = keysAry[i];
        if (a[keyName] !== b[keyName]) {
            return false;
        }
    }
    return true;
}
function findDiff(ary1, ary2) {
    // let sameAry = []
    for (var i = 0; i < ary1.length; i++) {
        for (var j = 0; j < ary2.length; j++) {
            let isSame = isValueEqual(ary1[i], ary2[j]);
            console.log("i:j", i, j, isSame)
            if (isSame) {
                ary1.splice(i,1)
                // sameAry.push(i)
            }
        }
    }
    console.log(ary1)
}
function formatData(obj){

}
findDiff(a1, a2)